using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Spread.Common.Features.Sample;
using FarPoint.Win;
using FarPoint.Win.Spread;
namespace Spread.Worksheet.Features
{
    public partial class FrozenRowColDemo : BaseSampleControl
    {
        public FrozenRowColDemo()
        {
            InitializeComponent();
            SetupSpreadSheet();
            InitializeControls();
        }
        
        private void SetupSpreadSheet()
        {
            Random random = new Random();
            int sum = 0, cost;
            Name = "Frozen Rows and Columns";
            sheetView.Columns.Count = 10;
            sheetView.Rows.Count = 30;

            sheetView.Columns.Add(0, 1);
            sheetView.Columns[0].Width = 150;
            sheetView.Cells[2, 0].Value = "Date";
            sheetView.Cells[2, 0].ForeColor = Color.Green;

            sheetView.AlternatingRows[1].BackColor = Color.WhiteSmoke;
            for(int column = 0; column < sheetView.Columns.Count; column++)
            {
                sheetView.Cells[2, column].Border = new LineBorder(Color.DarkOliveGreen, 3, false, true, false, false);
                sheetView.Cells[29, column].Border = new LineBorder(Color.DarkOliveGreen, 3, false, true, false, false);
            }
            for(int row = 3; row < 29; row++)
            {
                cost = random.Next(25, 500);
                sheetView.Cells[row, 2].Value = cost.ToString("C");
                sum += cost;
                sheetView.Cells[row, 0].Value = DateTime.Today.AddDays(random.Next(-30,0)).ToString("MMM dd , yyyy");
                sheetView.Cells[row, 0].Font = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular);
            }
            sheetView.Cells[29, 1].Value = "Total";
            sheetView.Cells[29, 2].Value = sum.ToString("C");
            sheetView.Cells[0, 0].Value = "Household";
            sheetView.Cells[1, 0].Value = "BUDGET";
            sheetView.Cells[0, 0].ForeColor = Color.Green;
            sheetView.Cells[1, 0].ForeColor = Color.Navy;
            sheetView.Cells[1,0].Font = sheetView.Cells[0, 0].Font = new Font(FontFamily.GenericMonospace, 16, FontStyle.Bold);
            sheetView.Cells[1,0].HorizontalAlignment = sheetView.Cells[0, 0].HorizontalAlignment = CellHorizontalAlignment.Center;
            sheetView.Cells[1,0].VerticalAlignment = sheetView.Cells[0, 0].VerticalAlignment = CellVerticalAlignment.Center;
            sheetView.FrozenRowCount = 3;
            sheetView.FrozenTrailingRowCount = 1;
            sheetView.FrozenColumnCount = 1;
            freezeRowUpDown.Value = 3;
            freezeColumnUpDown.Value = 1;
            trailingRowUpDown.Value = 1;
            spread.ScrollBarTrackPolicy = ScrollBarTrackPolicy.Both;
        }
        private void InitializeControls()
        {
            freezeRowUpDown.Minimum = freezeColumnUpDown.Minimum = trailingRowUpDown.Minimum = trailingColumnUpDown.Minimum = 0;
            freezeRowUpDown.Maximum = trailingRowUpDown.Maximum = sheetView.Rows.Count;
            freezeColumnUpDown.Maximum = trailingColumnUpDown.Maximum = sheetView.Columns.Count;
        }
        private void SetButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (freezeRowUpDown.Text != "" || trailingRowUpDown.Text != "" || freezeColumnUpDown.Text != "" || trailingColumnUpDown.Text != "")
                {
                    sheetView.FrozenRowCount = int.Parse(freezeRowUpDown.Text);
                    sheetView.FrozenTrailingRowCount = int.Parse(trailingRowUpDown.Text);
                    sheetView.FrozenColumnCount = int.Parse(freezeColumnUpDown.Text);
                    sheetView.FrozenTrailingColumnCount = int.Parse(trailingColumnUpDown.Text);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}


//
//FrozenRowColDemo.Designer.cs
//


namespace Spread.Worksheet.Features
{
    partial class FrozenRowColDemo
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.controlsGrpBox = new System.Windows.Forms.GroupBox();
            this.trailingColumnUpDown = new System.Windows.Forms.NumericUpDown();
            this.freezeColumnUpDown = new System.Windows.Forms.NumericUpDown();
            this.trailingRowUpDown = new System.Windows.Forms.NumericUpDown();
            this.freezeRowUpDown = new System.Windows.Forms.NumericUpDown();
            this.setButton = new System.Windows.Forms.Button();
            this.trailingColumnLabel = new System.Windows.Forms.Label();
            this.freezeColumnLabel = new System.Windows.Forms.Label();
            this.trailingRowCount = new System.Windows.Forms.Label();
            this.freezeRowLabel = new System.Windows.Forms.Label();
            this.spread = new FarPoint.Win.Spread.FpSpread();
            this.sheetView = new FarPoint.Win.Spread.SheetView();
            this.pnlMain.SuspendLayout();
            this.pnlControls.SuspendLayout();
            this.controlsGrpBox.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.trailingColumnUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.freezeColumnUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.trailingRowUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.freezeRowUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.spread)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.sheetView)).BeginInit();
            this.SuspendLayout();
            // 
            // pnlMain
            // 
            this.pnlMain.Controls.Add(this.spread);
            // 
            // pnlControls
            // 
            this.pnlControls.Controls.Add(this.controlsGrpBox);
            // 
            // controlsGrpBox
            // 
            this.controlsGrpBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.controlsGrpBox.Controls.Add(this.trailingColumnUpDown);
            this.controlsGrpBox.Controls.Add(this.freezeColumnUpDown);
            this.controlsGrpBox.Controls.Add(this.trailingRowUpDown);
            this.controlsGrpBox.Controls.Add(this.freezeRowUpDown);
            this.controlsGrpBox.Controls.Add(this.setButton);
            this.controlsGrpBox.Controls.Add(this.trailingColumnLabel);
            this.controlsGrpBox.Controls.Add(this.freezeColumnLabel);
            this.controlsGrpBox.Controls.Add(this.trailingRowCount);
            this.controlsGrpBox.Controls.Add(this.freezeRowLabel);
            this.controlsGrpBox.Location = new System.Drawing.Point(5, 30);
            this.controlsGrpBox.Name = "controlsGrpBox";
            this.controlsGrpBox.Size = new System.Drawing.Size(132, 303);
            this.controlsGrpBox.TabIndex = 1;
            this.controlsGrpBox.TabStop = false;
            this.controlsGrpBox.Text = "Actions and Settings";
            // 
            // trailingColumnUpDown
            // 
            this.trailingColumnUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.trailingColumnUpDown.Location = new System.Drawing.Point(6, 234);
            this.trailingColumnUpDown.Name = "trailingColumnUpDown";
            this.trailingColumnUpDown.Size = new System.Drawing.Size(120, 20);
            this.trailingColumnUpDown.TabIndex = 3;
            // 
            // freezeColumnUpDown
            // 
            this.freezeColumnUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.freezeColumnUpDown.Location = new System.Drawing.Point(6, 171);
            this.freezeColumnUpDown.Name = "freezeColumnUpDown";
            this.freezeColumnUpDown.Size = new System.Drawing.Size(120, 20);
            this.freezeColumnUpDown.TabIndex = 2;
            // 
            // trailingRowUpDown
            // 
            this.trailingRowUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.trailingRowUpDown.Location = new System.Drawing.Point(6, 114);
            this.trailingRowUpDown.Name = "trailingRowUpDown";
            this.trailingRowUpDown.Size = new System.Drawing.Size(120, 20);
            this.trailingRowUpDown.TabIndex = 1;
            // 
            // freezeRowUpDown
            // 
            this.freezeRowUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.freezeRowUpDown.Location = new System.Drawing.Point(6, 62);
            this.freezeRowUpDown.Name = "freezeRowUpDown";
            this.freezeRowUpDown.Size = new System.Drawing.Size(120, 20);
            this.freezeRowUpDown.TabIndex = 0;
            // 
            // setButton
            // 
            this.setButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.setButton.Location = new System.Drawing.Point(6, 259);
            this.setButton.Name = "setButton";
            this.setButton.Size = new System.Drawing.Size(120, 23);
            this.setButton.TabIndex = 4;
            this.setButton.Text = "Set";
            this.setButton.UseVisualStyleBackColor = true;
            this.setButton.Click += new System.EventHandler(this.SetButton_Click);
            // 
            // trailingColumnLabel
            // 
            this.trailingColumnLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.trailingColumnLabel.Location = new System.Drawing.Point(3, 217);
            this.trailingColumnLabel.Name = "trailingColumnLabel";
            this.trailingColumnLabel.Size = new System.Drawing.Size(123, 13);
            this.trailingColumnLabel.TabIndex = 5;
            this.trailingColumnLabel.Text = "TrailingColumnCount";
            // 
            // freezeColumnLabel
            // 
            this.freezeColumnLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.freezeColumnLabel.Location = new System.Drawing.Point(3, 155);
            this.freezeColumnLabel.Name = "freezeColumnLabel";
            this.freezeColumnLabel.Size = new System.Drawing.Size(123, 13);
            this.freezeColumnLabel.TabIndex = 4;
            this.freezeColumnLabel.Text = "FreezeColumnCount";
            // 
            // trailingRowCount
            // 
            this.trailingRowCount.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.trailingRowCount.Location = new System.Drawing.Point(3, 97);
            this.trailingRowCount.Name = "trailingRowCount";
            this.trailingRowCount.Size = new System.Drawing.Size(123, 13);
            this.trailingRowCount.TabIndex = 3;
            this.trailingRowCount.Text = "Trailing Row Count";
            // 
            // freezeRowLabel
            // 
            this.freezeRowLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.freezeRowLabel.Location = new System.Drawing.Point(3, 45);
            this.freezeRowLabel.Name = "freezeRowLabel";
            this.freezeRowLabel.Size = new System.Drawing.Size(123, 13);
            this.freezeRowLabel.TabIndex = 2;
            this.freezeRowLabel.Text = "Freeze Row Count";
            // 
            // spread
            // 
            this.spread.Dock = System.Windows.Forms.DockStyle.Fill;
            this.spread.Location = new System.Drawing.Point(0, 0);
            this.spread.Name = "spread";
            this.spread.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
            this.sheetView});
            this.spread.Size = new System.Drawing.Size(477, 487);
            this.spread.TabIndex = 0;
            // 
            // sheetView
            // 
            this.sheetView.Reset();
            this.sheetView.SheetName = "Sheet1";
            // Formulas and custom names must be loaded with R1C1 reference style
            this.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
            this.sheetView.ActiveRowIndex = 1;
            this.sheetView.Cells.Get(0, 0).Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F);
            this.sheetView.Cells.Get(0, 0).ForeColor = System.Drawing.Color.Green;
            this.sheetView.Cells.Get(0, 0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
            this.sheetView.Cells.Get(0, 0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
            this.sheetView.Cells.Get(1, 0).Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(1, 0).ForeColor = System.Drawing.Color.Navy;
            this.sheetView.Cells.Get(1, 0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
            this.sheetView.Cells.Get(1, 0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
            this.sheetView.Cells.Get(2, 0).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(2, 0).ForeColor = System.Drawing.Color.Green;
            this.sheetView.Cells.Get(2, 0).Value = "EXPENSES";
            this.sheetView.Cells.Get(2, 1).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(2, 1).ForeColor = System.Drawing.Color.Green;
            this.sheetView.Cells.Get(2, 1).Value = "AMOUNT";
            this.sheetView.Cells.Get(2, 2).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(2, 2).ForeColor = System.Drawing.Color.Green;
            this.sheetView.Cells.Get(2, 2).Value = "NAME";
            this.sheetView.Cells.Get(2, 3).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(2, 3).ForeColor = System.Drawing.Color.Green;
            this.sheetView.Cells.Get(2, 3).Value = "NOTES";
            this.sheetView.Cells.Get(3, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(3, 0).Value = "Rent";
            this.sheetView.Cells.Get(3, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(3, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(3, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(3, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(3, 3).Value = "Notes";
            this.sheetView.Cells.Get(4, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(4, 0).Value = "Rent";
            this.sheetView.Cells.Get(4, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(4, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(4, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(4, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(4, 3).Value = "Notes";
            this.sheetView.Cells.Get(5, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(5, 0).Value = "Rent";
            this.sheetView.Cells.Get(5, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(5, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(5, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(5, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(5, 3).Value = "Notes";
            this.sheetView.Cells.Get(6, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(6, 0).Value = "Rent";
            this.sheetView.Cells.Get(6, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(6, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(6, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(6, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(6, 3).Value = "Notes";
            this.sheetView.Cells.Get(7, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(7, 0).Value = "Cable TV";
            this.sheetView.Cells.Get(7, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(7, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(7, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(7, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(7, 3).Value = "Notes";
            this.sheetView.Cells.Get(8, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(8, 0).Value = "CableTV";
            this.sheetView.Cells.Get(8, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(8, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(8, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(8, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(8, 3).Value = "Notes";
            this.sheetView.Cells.Get(9, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(9, 0).Value = "CableTV";
            this.sheetView.Cells.Get(9, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(9, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(9, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(9, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(9, 3).Value = "Notes";
            this.sheetView.Cells.Get(10, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(10, 0).Value = "CableTV";
            this.sheetView.Cells.Get(10, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(10, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(10, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(10, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(10, 3).Value = "Notes";
            this.sheetView.Cells.Get(11, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(11, 0).Value = "Groceries";
            this.sheetView.Cells.Get(11, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(11, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(11, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(11, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(11, 3).Value = "Notes";
            this.sheetView.Cells.Get(12, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(12, 0).Value = "Groceries";
            this.sheetView.Cells.Get(12, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(12, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(12, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(12, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(12, 3).Value = "Notes";
            this.sheetView.Cells.Get(13, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(13, 0).Value = "Electricity";
            this.sheetView.Cells.Get(13, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(13, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(13, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(13, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(13, 3).Value = "Notes";
            this.sheetView.Cells.Get(14, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(14, 0).Value = "Electricity";
            this.sheetView.Cells.Get(14, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(14, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(14, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(14, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(14, 3).Value = "Notes";
            this.sheetView.Cells.Get(15, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(15, 0).Value = "Electricity";
            this.sheetView.Cells.Get(15, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(15, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(15, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(15, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(15, 3).Value = "Notes";
            this.sheetView.Cells.Get(16, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(16, 0).Value = "Electricity";
            this.sheetView.Cells.Get(16, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(16, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(16, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(16, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(16, 3).Value = "Notes";
            this.sheetView.Cells.Get(17, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(17, 0).Value = "Food";
            this.sheetView.Cells.Get(17, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(17, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(17, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(17, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(17, 3).Value = "Notes";
            this.sheetView.Cells.Get(18, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(18, 0).Value = "Food";
            this.sheetView.Cells.Get(18, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(18, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(18, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(18, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(18, 3).Value = "Notes";
            this.sheetView.Cells.Get(19, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(19, 0).Value = "Food";
            this.sheetView.Cells.Get(19, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(19, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(19, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(19, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(19, 3).Value = "Notes";
            this.sheetView.Cells.Get(20, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(20, 0).Value = "Food";
            this.sheetView.Cells.Get(20, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(20, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(20, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(20, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(20, 3).Value = "Notes";
            this.sheetView.Cells.Get(21, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(21, 0).Value = "Travel";
            this.sheetView.Cells.Get(21, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(21, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(21, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(21, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(21, 3).Value = "Notes";
            this.sheetView.Cells.Get(22, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(22, 0).Value = "Travel";
            this.sheetView.Cells.Get(22, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(22, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(22, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(22, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(22, 3).Value = "Notes";
            this.sheetView.Cells.Get(23, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(23, 0).Value = "Travel";
            this.sheetView.Cells.Get(23, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(23, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(23, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(23, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(23, 3).Value = "Notes";
            this.sheetView.Cells.Get(24, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(24, 0).Value = "Travel";
            this.sheetView.Cells.Get(24, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(24, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(24, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(24, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(24, 3).Value = "Notes";
            this.sheetView.Cells.Get(25, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(25, 0).Value = "Other";
            this.sheetView.Cells.Get(25, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(25, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(25, 2).Value = "Roommate1";
            this.sheetView.Cells.Get(25, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(25, 3).Value = "Notes";
            this.sheetView.Cells.Get(26, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(26, 0).Value = "Other";
            this.sheetView.Cells.Get(26, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(26, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(26, 2).Value = "Roommate2";
            this.sheetView.Cells.Get(26, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(26, 3).Value = "Notes";
            this.sheetView.Cells.Get(27, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(27, 0).Value = "Other";
            this.sheetView.Cells.Get(27, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(27, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(27, 2).Value = "Roommate3";
            this.sheetView.Cells.Get(27, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(27, 3).Value = "Notes";
            this.sheetView.Cells.Get(28, 0).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(28, 0).Value = "Other";
            this.sheetView.Cells.Get(28, 1).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(28, 2).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(28, 2).Value = "Roommate4";
            this.sheetView.Cells.Get(28, 3).Font = new System.Drawing.Font("Arial Narrow", 12F);
            this.sheetView.Cells.Get(28, 3).Value = "Notes";
            this.sheetView.Cells.Get(29, 0).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Cells.Get(29, 1).Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Bold);
            this.sheetView.Columns.Default.Width = 150F;
            this.sheetView.Columns.Get(0).Width = 120F;
            this.sheetView.Rows.Default.Height = 30F;
            this.sheetView.Rows.Get(0).Height = 40F;
            this.sheetView.Rows.Get(1).Height = 41F;
            this.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
            // 
            // FrozenRowColDemo
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Name = "FrozenRowColDemo";
            this.pnlMain.ResumeLayout(false);
            this.pnlControls.ResumeLayout(false);
            this.controlsGrpBox.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.trailingColumnUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.freezeColumnUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.trailingRowUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.freezeRowUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.spread)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.sheetView)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion
        private System.Windows.Forms.GroupBox controlsGrpBox;
        private System.Windows.Forms.Button setButton;
        private FarPoint.Win.Spread.FpSpread spread;
        private FarPoint.Win.Spread.SheetView sheetView;
        private System.Windows.Forms.Label freezeRowLabel;
        private System.Windows.Forms.Label trailingRowCount;
        private System.Windows.Forms.Label freezeColumnLabel;
        private System.Windows.Forms.Label trailingColumnLabel;
        private System.Windows.Forms.NumericUpDown freezeRowUpDown;
        private System.Windows.Forms.NumericUpDown trailingRowUpDown;
        private System.Windows.Forms.NumericUpDown freezeColumnUpDown;
        private System.Windows.Forms.NumericUpDown trailingColumnUpDown;
    }
}
